<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">


<h:head>
	<link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/css/styles.css" />
	<title>Voli Richiesti</title>
</h:head>

<h:body>
<div id="header">
	<ui:include src="/resources/snippets/headerDipendente.xhtml"></ui:include>
</div>
	<h1> Voli Richiesti</h1>  
    	<h:dataTable value="#{volo.listaVoli}" var="voloCurr">
    		<h:column>
    			<f:facet name="header">Codice</f:facet>
    			<h:outputText value="#{voloCurr.codice}"/>
    		</h:column>
 			<h:column>
    			<f:facet name="header">Compagnia</f:facet>
    			<h:outputText value="#{voloCurr.compagnia}"/>
    		</h:column>
    		<h:column>
    			<f:facet name="header">Ora</f:facet>
    			<h:outputText value="#{voloCurr.ora}"/>
    		</h:column>
    		<h:column>
    			<f:facet name="header">Città Partenza</f:facet>
    			<h:outputText value="#{voloCurr.cittaPartenza}"/>
    		</h:column>
    		<h:column>
    			<f:facet name="header">Città Arrivo</f:facet>
    			<h:outputText value="#{voloCurr.cittaArrivo}"/>
    		</h:column>
    		<h:column>
    			<h:form>
					<h:commandButton value="Elimina" action="#{volo.delete(voloCurr)}" styleClass="styleButton"/>
				</h:form>
    		</h:column>
    	</h:dataTable>
    <br/>
	<br/>
	<br/>
	<h:link outcome="findProdottoBase" value="Torna Indietro" />
	<br/>
	<br/>
	<br/>
<div id="footer">
	<ui:include src="/resources/snippets/footer.xhtml"></ui:include>
</div>
</h:body>
</html>